<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/commons/include/html_doctype.html" %>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<%@include file="/commons/page/codegen.jsp" %>
		<script type="text/javascript" src="${ctx}/js/gpoint/rdp/CurrentPermission/currentPermissionPid.js"></script>
		<title>TB_DOOR_CURRENTPERMISSION管理列表</title>
	</head>
	<body>
	
		<div class="wrapper wrapper-content  animated fadeInRight col-sm-12">
			<div  class="toolbar-panel ">
				<div class="toolbar-box">
					<div class="toolbar-head clearfix">
						<!-- 顶部按钮 -->
						<div class="buttons"> 	
					
							
							<a class="btn btn-primary fa fa-search" href="javascript:void(0);" onclick="check()"><span>搜索</span></a>
							<%-- <a class="btn btn-primary fa fa-add"   href="${ctx}/rdp/CurrentPermission/currentPermission/edit.htm" ><span>添加</span></a> --%>
					       <%--  <a class="btn btn-primary fa fa-edit"   href="javascript:void(0);"  action="${ctx}/rdp/CurrentPermission/currentPermission/edit.htm" ><span>编辑</span></a> --%>	 
					       <%--  <a class="btn btn-primary fa fa-remove" href="javascript:void(0);"  action="${ctx}/rdp/CurrentPermission/currentPermission/remove.htm"><span>删除</span></a> --%>
					       <!--  <a class="btn btn-primary fa fa-search" href="javascript:void(0);"  onclick="openDialog()"><span>授权</span></a> -->
					     <%--   <a class="btn btn-primary fa fa-edit" href="javascript:void(0);"  action="${ctx}/rdp/CurrentPermission/currentPermission/edit2.htm"><span>取消</span></a> --%>
					       
					    <%--     <a class="btn btn-primary fa fa-edit" href="javascript:void(0);"  action="${ctx}/rdp/CurrentPermission/currentPermission/edit2.htm"><span>取消</span></a> --%>
					       <!--  <a class="btn btn-primary fa " href="javascript:void(0);" onclick="quxiao()"    ><span>取消</span></a> -->
	
						</div>
						<!-- 收缩 -->
						<div class="tools">
							<a href="javascript:void(0);" class="collapse">
								<i class="bigger-180 fa  fa-angle-double-up"></i>
							</a>
						</div>
					</div>
					<!-- #查询条件-->
					<div class="toolbar-body" >
						<form role="form" class="search-form">
							<div  class="form-inline p-xxs">
								<!-- <div class="form-group">
									<label   class="search-label">权限ID-11111</label>:
									<input type="text"  name="Q^PERMISSIONID^SL"  class="form-control"  />
								</div>  -->
								<div class="form-group">
									<label   class="search-label">学工号</label>:
									<input type="text"  name="Q^STUDENTNO^SL"  class="form-control"  />
								</div> 
								<!-- <div class="form-group">
									<label   class="search-label">学生UID</label>:
									<input type="text"  name="Q^STUDENTUID^SL"  class="form-control"  />
								</div> 
								 -->
							<div class="form-group">
									<label   class="search-label">学生姓名</label>:
									<input type="text"  name="Q^USERNAME^SL"  class="form-control"  />
								</div> 
								
								<div class="form-group">
									<label   class="search-label">控制器名称</label>:
									<input type="text"  name="Q^CONTROLLERNAME^SL"  class="form-control"  />
								</div>
								 	
								
								
								
								
								<div class="form-group">
									<label   class="search-label">门名称</label>:
									<input type="text"  name="Q^CONTROLLERNO^SL"  class="form-control"  />
								</div>
								 
							<!-- 	<div class="form-group">
									<label   class="search-label">门号</label>:
									<input type="text"  name="Q^DOORNO^SL"  class="form-control"  />
								</div>  --> 
							<!-- 	<div class="form-group">
									<label   class="search-label">权限类型</label>:
									<input type="text"  name="Q^PERMISSIONTYPE^SL"  class="form-control"  />
								</div>  -->
								<!--  这里查询需要做转义-->
							<!-- 	<div class="form-group">
									<label   class="search-label">权限状态</label>:
									<input type="text"  name="Q^PERMISSIONSTATUS^SL"  class="form-control"  />
								</div> --> 
								<!-- <div class="form-group">
									<label class="search-label">分配时间 </label>:
									<input type="text" name="Q^ALLOCATEDTIME^DL"  class="form-control date"  />
								</div> -->
								
								 <label class="search-label">分配时间</label>:
							     <div class="form-group">
									<div class="input-icon" >
									<i class="fa fa-calendar"></i>
									<input type="text" readonly="readonly" class="fr-form-control datepicker" datefmt="yyyy-MM-dd HH:mm:ss"   name="Q^ALLOCATEDTIME^DL"  id="Q^READDATE^DL"   pattern="yyyy-MM-dd HH:mm:ss"/>
								   </div>
								  		
								</div> 
								
								
								 <label class="search-label">至</label>:
							     <div class="form-group">
									<div class="input-icon" >
									<i class="fa fa-calendar"></i>
									<input type="text" readonly="readonly" class="fr-form-control datepicker" datefmt="yyyy-MM-dd HH:mm:ss"  name="Q^ALLOCATEDTIME^DG"   id="Q^READDATE^DG"   pattern="yyyy-MM-dd HH:mm:ss"/>
								   </div>
								  		
								</div> 
								
								
								<!-- <div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^ALLOCATEDTIME^DG"  class="form-control date" />
								</div> -->
								<!-- <div class="form-group">
									<label class="search-label">下发日期 </label>:
									<input type="text" name="Q^DOWNTIME^DL"  class="form-control date"  />
								</div>
								 -->
								 <label class="search-label">下发时间</label>:
							     <div class="form-group">
									<div class="input-icon" >
									<i class="fa fa-calendar"></i>
									<input type="text" readonly="readonly" class="fr-form-control datepicker" datefmt="yyyy-MM-dd HH:mm:ss"   name="Q^DOWNTIME^DL"  id="Q^DOWNTIME^DL"   pattern="yyyy-MM-dd HH:mm:ss"/>
								   </div>
								  		
								</div> 
								
								
								 <label class="search-label">至</label>:
							     <div class="form-group">
									<div class="input-icon" >
									<i class="fa fa-calendar"></i>
									<input type="text" readonly="readonly" class="fr-form-control datepicker" datefmt="yyyy-MM-dd HH:mm:ss"  name="Q^DOWNTIME^DG"   id="Q^DOWNTIME^DG"   pattern="yyyy-MM-dd HH:mm:ss"/>
								   </div>
								  		
								</div> 
								
								
								
								
								<!-- <div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^DOWNTIME^DG"  class="form-control date" />
								</div> -->
								<!-- <div class="form-group">
									<label   class="search-label">时间段</label>:
									<input type="text"  name="Q^TIMESEG^SL"  class="form-control"  />
								</div>  -->
								<!-- <div class="form-group">
									<label   class="search-label">用户密码</label>:
									<input type="text"  name="Q^USERPASSWORD^SL"  class="form-control"  />
								</div>  -->
								<!-- <div class="form-group">
									<label   class="search-label">生效时间</label>:
									<input type="text"  name="Q^EFFECTTIME^SL"  class="form-control"  />
								</div>  -->
								<!-- <div class="form-group">
									<label class="search-label">开始时间 </label>:
									<input type="text" name="Q^STARTTIME^DL"  class="form-control date"  />
								</div>
								<div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^STARTTIME^DG"  class="form-control date" />
								</div>
								<div class="form-group">
									<label class="search-label">结束时间 </label>:
									<input type="text" name="Q^ENDTIME^DL"  class="form-control date"  />
								</div> -->
								<!-- <div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^ENDTIME^DG"  class="form-control date" />
								</div> -->
								<!-- <div class="form-group">
									<label   class="search-label">权限组</label>:
									<input type="text"  name="Q^PERMISSIONGROUP^SL"  class="form-control"  />
								</div>  -->
								<!-- <div class="form-group">
									<label   class="search-label">SERVICECODE</label>:
									<input type="text"  name="Q^SERVICECODE^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT1</label>:
									<input type="text"  name="Q^EXT1^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT2</label>:
									<input type="text"  name="Q^EXT2^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT3</label>:
									<input type="text"  name="Q^EXT3^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT4</label>:
									<input type="text"  name="Q^EXT4^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT5</label>:
									<input type="text"  name="Q^EXT5^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">EXT6</label>:
									<input type="text"  name="Q^EXT6^SL"  class="form-control"  />
								</div>  -->
							</div>
						</form>
					</div><!--/ 查询条件-->
				</div>
			</div><!--/ 操作、查询-->
			<div class="jqGrid_wrapper">
				<table id="currentPermissionGrid" ></table>
				<div id="currentPermissionPager"></div>
			</div>
		</div>
	
	<script type="text/javascript">
	 function openDialog(){
	    	
		 /*  var iwidth = 1600;
		  var iheight = 1000;
		  var itop = (window.screen.availHeight-iheight)/2;       //获得窗口的垂直位置;
		  var ileft = (window.screen.availWidth-iwidth)/2;      //获得窗口的水平位置; 		   		   
		  win = window.open(
				"http://127.0.0.1:8083/rdp/zone/doorZone/list3.htm", 
				"区域管理", 
				"status=no,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,top="+itop+",left="+ileft+",width="+iwidth+",height="+iheight
		   );    */
		   
		   
		 DialogUtil.dialog(
				 {
		 				title : "授权操作",
		 				//content : '${ctx}/rdp/zone/doorZone/listboxselect.htm',
		 				//	content : '${ctx}/rdp/zone/doorZone/listbatchAuth.htm',
		 					content : '${ctx}/rdp/zone/doorZone/listZoneManage.htm',
		 				area : [ '1100px', '800px' ],
		 				maxmin : false,
		 				end : function() {
		 					$("#currentPermissionGrid").trigger("reloadGrid");
						}
		 			
		 		}
		 );
		   
		   
		   
	   }
	 
	 
	 
	 
	 function quxiao(){
		 var ids = jQuery("#currentPermissionGrid").jqGrid('getGridParam','selarrrow');
	       if(ids.length <0){
	    	   DialogUtil.confirm("请至少选择一个选项");
	    	   return;
	       }
	     /*   var rowData= jQuery("#currentPermissionGrid").jqGrid("getRowData",ids[0]);
	        
		
		 //获取数值
		 console.log(rowData);
		
		  
		  ids=rowData.usernum;   */
		  //var  type=ids[0];
		   var type=ids; 
		 
		  DialogUtil.confirm('' + '是否继续执行取消操作',
					function(rtn) {
					if(rtn)
						window.location.href = "${ctx}/rdp/CurrentPermission/currentPermission/edit2.htm?id="+ids;
					else{
						
					}
						
					});
	 }
	</script>
	</body>
	
</html>